import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
export default defineConfig({
  plugins: [ uni()],
	server : {
		port: 9528,
		proxy: {
			'/apis': {
				target: 'https://api.shan-niang.net/',
				changeOrigin: true,
				rewrite: (path) => path.replace(/^\/apis/, ''), // 此处进行路径重写
			},
			'/token_api': {
				target: 'https://ids.shan-niang.net/',
				changeOrigin: true,
				rewrite: (path) => path.replace(/^\/token_api/, ''), // 此处进行路径重写
			}
		},
	},
})
 